<template>
<el-card shadow="never" class="aui-card--fill">
    <div class="mod-sys__dept">
        <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
            <el-form-item>
                <el-select v-model="dataForm.disposeState" placeholder="请选择是否已回复" clearable>
                    <el-option label="已处理" value="1">
                    </el-option>
                    <el-option label="待处理" value="0">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-input v-model="dataForm.guestPhone" placeholder="手机号" clearable></el-input>
            </el-form-item>
            <el-form-item>
                <el-button @click="getDataList()">{{ $t('query') }}</el-button>
            </el-form-item>
            <!-- <el-form-item v-if="$store.state.user.superAdmin==1">
                <el-button type="primary" @click="addOrUpdateHandle()">{{ $t("add") }}</el-button>
            </el-form-item> -->
        </el-form>
        <el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%">
            <el-table-column type="selection" align="center" width="50"></el-table-column>
            <el-table-column type="index" align="center" width="50" label="序号"></el-table-column>
             <el-table-column prop="guestPhone" label="下单手机号"  min-width="160px" align="center"></el-table-column>
             <el-table-column prop="orderCode" label="订单编号" :show-overflow-tooltip="true" min-width="180px" align="center"></el-table-column>
            <el-table-column prop="invoiceTitle" label="发票抬头" align="center" :show-overflow-tooltip="true" min-width="240"></el-table-column>
            <!-- <el-table-column prop="type" label="抬头类型" align="center" min-width="120">
                <template slot-scope="scope">
                    {{scope.row.type==1?'个人/非企业单位':'企业'}}
                </template>
            </el-table-column> -->
            <el-table-column prop="taxNumber" label="税号" :show-overflow-tooltip="true" min-width="150px" align="center"></el-table-column>
            <el-table-column prop="orderAmount" label="交易金额" :show-overflow-tooltip="true" min-width="150px" align="center"></el-table-column>
            <!-- <el-table-column prop="depositBank" label="开户银行" :show-overflow-tooltip="true" min-width="150px" align="center"></el-table-column> -->
            <!-- <el-table-column prop="unitAddress" label="单位地址" min-width="150px" align="center" :show-overflow-tooltip="true"></el-table-column>
            <el-table-column prop="unitPhone" label="单位电话号码" min-width="150px" align="center"></el-table-column> -->
            <!-- <el-table-column prop="email" label="邮箱" align="center" min-width="150px"></el-table-column> -->
            <el-table-column prop="disposeState" label="状态" align="center" width="150px">
                <template slot-scope="scope">
                    <el-button :type="scope.row.disposeState!=1?'info':'success'" size="mini"> {{scope.row.disposeState!=1?'待处理':'已处理'}}</el-button>
                </template>
            </el-table-column>
            <el-table-column :label="$t('handle')" fixed="right" align="center" width="150">
                <template slot-scope="scope">
                    <el-button type="text" size="small" @click="lookDetail(scope.row.id)">详情</el-button>
                    <!-- <el-button v-if="!scope.row.isReply" type="text" size="small" @click="checkData(scope.row.id)">回复</el-button> -->
                </template>
            </el-table-column>
        </el-table>
        <el-pagination :current-page="page" :page-sizes="[10, 20, 50, 100]" :page-size="limit" :total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle" @current-change="pageCurrentChangeHandle">
        </el-pagination>
        <!-- 详情 -->
        <look-detail v-if="lookDetailVisible" ref="lookDetail"></look-detail>
    </div>
</el-card>
</template>

<script>
import lookDetail from './invoiceManageDetail'
import mixinViewModule from "@/mixins/view-module";
export default {
    mixins: [mixinViewModule],
    data() {
        return {
            mixinViewModuleOptions: {
                getDataListURL: "/hotel/invoice/page",
                getDataListIsPage: true,
            },
            dataForm: {
                disposeState: '',
                guestPhone: '',
            },
        };
    },
    components: {
        lookDetail
    },
    methods: {

    }
};
</script>

<style scoped>
.p {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical
}
</style>
